import { Injectable } from '@nestjs/common';

abstract class Api {
  /* 开发环境用这个 */
  protected baseURL: string = 'http://localhost:7504/api';

  /* 生产环境用这个 */
  // protected baseURL: string = 'xxxxx';
}

/**
 * @class RamApi
 * @description 鉴权相关的接口
 */
@Injectable()
export class RamApi extends Api {
  public getCheckUserLoginApi(token: string): string {
    return `${this.baseURL}/ram/admin-user/check-login/${token}`;
  }

  public getRefreshTokenApi(token: string): string {
    return `${this.baseURL}/refresh-token/ram/admin-user/refresh-token/${token}`;
  }
}
